class Equip_Props_Store
  attr_reader   :pool
  def initialize
    @pool = []
  end
  def exist_props(id, equip_type)
    for item in @pool
      if item.id == id && item.equip_type == equip_type
        return true
      end
    end
    return false
  end
  def get_props_list(id, equip_type)
    temp = []
    for item in @pool
      if item.id == id && item.equip_type == equip_type
        temp.push(item)
      end
    end
    return temp
  end
  def make_plus(id, index)
    return if id == 0 || id == nil
    count = rand(4)
    for i in 0..count
      plus_type = rand(3)
      min = Equip_Props::VALUE_MIN[plus_type]
      max = Equip_Props::VALUE_MAX[plus_type] + 1
      value = rand(max - min) + min
      item = Equip_Props.new(id, index == 0 ? 1:2, plus_type, value)
      @pool.push(item)
      GlobalMethods.addLog(item.to_s)
    end
  end
end
